<template>
  <div id="app">
    <mt-header fixed :title="$route.meta.title">
		  <span slot="left" v-if="$route.meta.re">
		    <mt-button icon="back" @click="goBack">返回</mt-button>
		  </span>
	</mt-header>
	<transition>
		 <router-view/>
	</transition>
	<nav class="mui-bar mui-bar-tab">
				<router-link class="mui-tab-item " to="/home">
					<span class="mui-icon mui-icon-home"></span>
					<span class="mui-tab-label">首页</span>
				</router-link>
				<router-link class="mui-tab-item" to="/category">
					<span class="mui-icon mui-icon-extra mui-icon-extra-class"></span>
					<span class="mui-tab-label">分类</span>
				</router-link>
				<router-link class="mui-tab-item" to="/shopcart">
					<span class="mui-icon mui-icon-extra mui-icon-extra-cart"></span>
					<span class="mui-tab-label">购物车</span>
				</router-link>
				<router-link class="mui-tab-item" to="/user">
					<span class="mui-icon mui-icon-contact"></span>
					<span class="mui-tab-label">我的</span>
				</router-link>
			</nav>
  </div>
</template>
<script>
	
export default {
	created(){
		
	},
	methods:{
		goBack(){
			this.$router.go(-1)
		}
	}
}
	
</script>


<style>
*{
  touch-action: none;
}

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  padding-top: 40px;
  overflow:hidden;
  box-sizing: border-box;
}

.v-enter{
	transform: translateX(100%);
	opacity: 0;
}
.v-leave-to{
	transform: translateX(-100%);
	position: absolute;
	opacity:0;
}
.v-enter-active,.v-leave-active{
	transition: all 1s ease;
}
</style>
